﻿@using FotoLab.DomainLayer.Model
@model FotoLab.DomainLayer.Model.Klant

@{
    ViewBag.Title = "KLANTGEGEVENS";
}
<style>
    body {
        background-image: url('../../Content/bg-klant.jpg');
        background-size: cover;
    }
</style>

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Create</title>
</head>
<body>
    @using (Html.BeginForm()) 
    {
        @Html.AntiForgeryToken()

            <div class="row klanten">
                <div class="col-sm-4 klantenBlok mirrorImage van">
                    <img src="~/Content/shipping.png" alt="shipping" />
                </div>
                <div class="col-sm-4 klantenBlok">
                    <div class="form-horizontal" style="margin-right: -115px;">
                        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
                        <div class="form-group verzend">
                            <div class="col-sm-10 col">                               
                                @Html.EditorFor(model => model.Naam.Aanhef, new {htmlAttributes = new {@class = "form-control adres", @placeholder = "Aanhef"}})
                            </div>
                        </div>
                        <div class="form-group verzend">
                            <div class="col-sm-10">
                                @Html.EditorFor(model => model.Naam.Voornaam, new { htmlAttributes = new { @class = "form-control adres", @placeholder = "Voornaam" } })
                            </div>
                        </div>
                        <div class="form-group verzend">
                            <div class="col-sm-10">
                                @Html.EditorFor(model => model.Naam.Tussenvoegsel, new { htmlAttributes = new { @class = "form-control adres", @placeholder = "Tussenvoegsel" } })
                            </div>
                        </div>
                        <div class="form-group verzend">
                            <div class="col-sm-10">
                                @Html.EditorFor(model => model.Naam.Achternaam, new { htmlAttributes = new { @class = "form-control adres", @placeholder = "Achternaam" } })
                                @Html.ValidationMessageFor(model => model.Naam, "", new { @class = "text-danger" })
                            </div>
                        </div>
                        <div class="form-group verzend">
                            <div class="col-sm-10">
                                @Html.EditorFor(model => model.Email, new { htmlAttributes = new { @class = "form-control adres", @placeholder = "Emailadres" } })
                                @Html.ValidationMessageFor(model => model.Email, "", new { @class = "text-danger" })
                            </div>
                        </div>
                        <div class="form-group verzend">
                            <div class="col-sm-10">
                                @Html.EditorFor(model => model.Telefoon, new { htmlAttributes = new { @class = "form-control adres", @placeholder = "Telefoonnummer" } })
                                @Html.ValidationMessageFor(model => model.Telefoon, "", new { @class = "text-danger" })
                            </div>
                        </div>
                        <div class="form-group verzend">
                            <div class="col-sm-10">
                                @Html.EditorFor(model => model.VerzendAdres.Straatnaam, new { htmlAttributes = new { @class = "form-control adres", @placeholder = "Straatnaam", @Id = "straatV" } })
                            </div>
                        </div>
                        <div class="form-group verzend">
                            <div class="col-sm-10">
                                @Html.EditorFor(model => model.VerzendAdres.Huisnummer, new { htmlAttributes = new { @class = "form-control adres", @placeholder = "Huisnummer", @Id = "huisnummerV" } })
                            </div>
                        </div>
                        <div class="form-group verzend">
                            <div class="col-sm-10">
                                @Html.EditorFor(model => model.VerzendAdres.Postcode, new { htmlAttributes = new { @class = "form-control adres", @placeholder = "Postcode vb. 1234AB", @Id = "postcodeV" } })
                            </div>
                        </div>
                        <div class="form-group verzend">
                            <div class="col-sm-10">
                                @Html.EditorFor(model => model.VerzendAdres.Plaats, new {htmlAttributes = new {@class = "form-control adres", @placeholder = "Plaatsnaam", @Id = "plaatsV"}})
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-10">
                                <div>
                                    <input id="chkBox" type="checkbox" />
                                    <label for="chkBox">Afwijkend factuuradres</label>
                                </div>
                            </div>
                        </div>
                        @*<div class="form-group factuur">
                            <div class="col-sm-10">
                                @Html.LabelFor(model => model.FactuurAdres, htmlAttributes: new { @class = "control-label col-md-2 adres" })
                            </div>
                        </div>*@
                        <div class="form-group factuur">
                            <div class="col-sm-10">
                                @Html.EditorFor(model => model.FactuurAdres.Straatnaam, new { htmlAttributes = new { @class = "form-control adres", @placeholder = "Straatnaam", @Id = "straatF" } })
                            </div>
                        </div>
                        <div class="form-group factuur">
                            <div class="col-sm-10">
                                @Html.EditorFor(model => model.FactuurAdres.Huisnummer, new { htmlAttributes = new { @class = "form-control adres", @placeholder = "Huisnummer", @Id = "huisnummerF" } })
                            </div>
                        </div>
                        <div class="form-group factuur">
                            <div class="col-sm-10">
                                @Html.EditorFor(model => model.FactuurAdres.Postcode, new { htmlAttributes = new { @class = "form-control adres", @placeholder = "Postcode vb. 1234AB", @Id = "postcodeF" } })
                            </div>
                        </div>
                        <div class="form-group factuur">
                            <div class="col-sm-10">
                                @Html.EditorFor(model => model.FactuurAdres.Plaats, new {htmlAttributes = new {@class = "form-control adres", @placeholder = "Plaatsnaam", @Id = "plaatsF"}})
                            </div>
                        </div>
                        <div class="form-group verzend">
                            <div class="col-sm-10">
                                <input type="submit" value="BETAAL BESTELLING" class="btn btn-bestel adres" onclick="SetFactuur(chkBox.checked);" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-4 klantenBlok van">
                    <img src="~/Content/shipping.png" alt="shipping" />
                </div>
            </div>

            <script type="text/javascript">
        $(document).ready(function () {
            var chkControl = document.getElementById('chkBox');
            // Hide default
            $(".factuur").css("display", "none");

            // checkbox 'click' event
            $(chkControl).click(function () {
                if ($(chkControl).is(":checked")) {
                    $(".factuur").show("slow");
                }
                else {
                    $(".factuur").hide("slow");
                }
            });
        });
        function SetFactuur(checked) {
            if (!checked) {
                document.getElementById('postcodeF').value = document.getElementById('postcodeV').value;
                document.getElementById('huisnummerF').value = document.getElementById('huisnummerV').value;
                document.getElementById('straatF').value = document.getElementById('straatV').value;
                document.getElementById('plaatsF').value = document.getElementById('plaatsV').value;
            }
        }
            </script>


            }

</body>
</html>
